package com.oazon.moco.link.serialport;

import java.util.Arrays;

import com.oazon.moco.link.core.LinkEvent;
import com.oazon.moco.link.core.LinkEventListener;
import com.oazon.moco.link.core.source.LinkEventSource;
import com.oazon.moco.link.event.PlayerEvent;


public class SerialPlayerStatusListener extends LinkEventListener{

	public SerialPlayerStatusListener(LinkEventSource... sources) {
		setBlackList(Arrays.asList(sources));
	}

	@Override
	public void onLinkEvent(LinkEvent event) {
		if(filter((LinkEventSource)event.getSource())|| !(event instanceof PlayerEvent)){
			return;
		}
		PlayerEvent e = (PlayerEvent)event;
		System.out.println("send "+e.getType().toString()+"message to MCU");
	}
}
